POV-Ray : Newsgroups : povray.beta-test : A bug in shapes.inc? : Re: A bug in shapes.inc? Server Time
1 Jun 2024 22:03:33 EDT (-0400)
  Re: A bug in shapes.inc?  
From: Le Forgeron
Date: 17 May 2011 12:52:31
Message: <4dd2a7cf$1@news.povray.org>
Le 17/05/2011 14:14, Thomas de Groot nous fit lire :
> I believe something is seriously wrong with the include file shapes.inc, and 
> particularly with the HFCreate_ () macro.
> 
> 
> 
> Try this code, with an image twice as long as high (i.e. a planetary map):

> 1)    for resolutions higher than approximately 1000, parse errors occur and 
> the render fails, whether a file is saved or not.
> 
> 2)    If you examine a save file, you will notice that the data sets are 
> written all on one line and without separating commas.
> 

I got 8 lines in the saved file with a 2400x1200 image.
No comma between vector (but comma is traditionally optional in SDL)
I have an issue on the face_indices values: 1.996e+06 is not a good
value, as I have a bit more vectors and it complains about finding a "<"
instead of a "}".

The number should not be rounded.
You get lucky with 1000x1000 as it comes out as 1e+06
but you would be in trouble with 1001x1001, IMHO.
A few line feed would be welcome too.
(like one every 10 vector ?)

The update should be done in the #Write of HFCreate_, to replace
xRes*zRes with
xRes,"*",zRes

(and
(xRes-1)*(zRes-1)*2 with
(xRes-1),"*",(zRes-1),"*2"
) (if you get the spirit of it ?)

There already some double while-loop used to dump the vectors, so adding
a "\n" under #if(WriteFile) might already ease the output file.
(well, instead of 1 line of 1 million vectors... 1000 lines of 1000
vectors each... is that better ?)

> 
> 
> Typical parse error messages are:
> 
> For a saved file:
> 
> "shapes_test.inc" line 7: Parse Error: No matching } in 'face_indices', < 
> found instead
> 
> 
> 
> For a render without save file:
> 
> "C:\...\POV-Ray\v3.7\include\shapes.inc" line 967: Parse Error: bad 
> allocation

I got a full render if I comment out the last "object" from the scene.
It's just plain black. (well, no light, no ambient.. ok)

The maximum resident size was 2 161 776 kilobytes. Might be an issue for
32 bits systems. (that's a bit more than 2 Giga, usual issue for 32 bits
program)
What is your system ?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.